
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports VisualJS
Imports VisualJS.Web.Forms
Imports System.Linq
Imports System.Text

Namespace SampleForms
	Public Partial Class ColorPickerTest
		Inherits VisualJS.Web.Forms.Form
		Public Sub New()
			InitializeComponent()
		End Sub

		'Use the below constructor if you create the instance of this Form object other than the active Thread
		'otherwise you will receive "Cant locate the ClientID in active context. Consider using Form constructor with ClientID parameter" exception
		Public Sub New(clientId As String)
			MyBase.New(clientId)
			InitializeComponent()
		End Sub

        Private Sub checkBox1_CheckedChanged(sender As Object, e As EventArgs) Handles checkBox1.CheckedChanged
            panel1.VerticalGradient = checkBox1.Checked
        End Sub

        Private Sub colorPicker1_TextChanged(sender As Object, e As EventArgs) Handles colorPicker1.TextChanged
            panel1.BackColor = colorPicker1.Color
        End Sub

        Private Sub colorPicker2_TextChanged(sender As Object, e As EventArgs) Handles colorPicker2.TextChanged
            panel1.BackColorEnd = colorPicker2.Color
        End Sub
	End Class
End Namespace
